<template>
  <div>
    <el-card :bordered="false" shadow="never" class="ivu-mt" :body-style="{ padding: 0 }">
      <div class="padding-add">
        <el-form
          ref="userFrom"
          :model="userFrom"
          label-width="80px"
          label-position="right"
          @submit.native.prevent
          inline
        >
          <div class="acea-row search-form">
            <div>
              <el-form-item label="收款账号：" label-width="120px" label-for="searchAccount">
                <el-input
                  clearable
                  placeholder="请输入内容"
                  v-model="userFrom.searchAccount"
                  class="form_content_width"
                />
              </el-form-item>
              <el-form-item label="收款人名称：" label-width="120px" label-for="searchName">
                <el-input clearable placeholder="请输入内容" v-model="userFrom.searchName" class="form_content_width" />
              </el-form-item>

              <el-form-item label="ABA代码:" label-width="120px" label-for="searchABA">
                <el-input clearable placeholder="请输入内容" v-model="userFrom.searchABA" class="form_content_width" />
              </el-form-item>
              <el-form-item label="ACH付款码：" label-width="120px" label-for="searchACH">
                <el-input clearable placeholder="请输入内容" v-model="userFrom.searchACH" class="form_content_width" />
              </el-form-item>
            </div>
            <el-form-item class="search-form-sub">
              <el-button type="primary" @click="userSearchs">搜索</el-button>
              <el-button class="ResetSearch" @click="reset('userFrom')">重置</el-button>
              <el-button type="primary" @click="userSearchs">新增</el-button>

            </el-form-item>
          </div>
        </el-form>
      </div>
    </el-card>
    <el-card :bordered="false" shadow="never" class="ivu-mt mt16" :body-style="{ padding: '0 20px 20px' }">
      <el-tabs v-model="userFrom.user_type" @tab-click="onClickTab">
        <el-tab-pane :label="item.name" :name="item.type" v-for="(item, index) in headeNum" :key="index" />
      </el-tabs>
      <el-table
        :data="userLists"
        class="mt16"
        ref="table"
        highlight-current-row
        v-loading="loading"
        empty-text="暂无数据"
        no-filtered-userFrom-text="暂无筛选结果"
        @sort-change="sortChanged"
        @select="handleSelectRow"
        @select-all="handleSelectAll"
      >
        <el-table-column label="ID" min-width="35">
          <template slot-scope="scope">
            <span>{{ scope.row.id }}</span>
          </template>
        </el-table-column>
        <el-table-column label="收款账号" min-width="30">
          <template slot-scope="scope">
             <span>{{ scope.row.account }}</span>
          </template>
        </el-table-column>
        <el-table-column label="收款人名称" min-width="50">
          <template slot-scope="scope">
            <span>{{ scope.row.payee }}</span>
          </template>
        </el-table-column>
        <el-table-column label="ABA代码" min-width="60">
          <template slot-scope="scope">
            <span>{{ scope.row.aba_code }}</span>
          </template>
        </el-table-column>
        <el-table-column label="中间银行" min-width="80">
          <template slot-scope="scope">
            <span>{{ scope.row.mid_bank_name }}</span>
          </template>
        </el-table-column>
        <el-table-column label="ACH付款码" min-width="120">
          <template slot-scope="scope">
            <span>{{ scope.row.ach_code }}</span>
          </template>
        </el-table-column>
     
        <el-table-column label="SWIFT代码" min-width="80">
          <template slot-scope="scope">
            <div>{{ scope.row.swift_code }}</div>
          </template>
        </el-table-column>
      
        <el-table-column label="创建时间" prop="now_money" min-width="100" :sortable="true">
          <template slot-scope="scope">
            <div>{{ scope.row.create_time }}</div>
          </template>
        </el-table-column>
        <el-table-column label="操作" fixed="right" width="120">
          <template slot-scope="scope">
            <template>
              <a @click="userDetail(scope.row)">编辑</a>

              <el-divider direction="vertical"></el-divider>
              <a @click="userDetail(scope.row)">删除</a>
            </template>
          </template>
        </el-table-column>
      </el-table>
      <div class="acea-row row-right page">
        <pagination
          v-if="total"
          :total="total"
          :page.sync="userFrom.page"
          :limit.sync="userFrom.limit"
          @pagination="pageChange"
        />
      </div>
    </el-card>
  </div>
</template>
<script>
import { getShopAuth, getProvinceFn ,getReceivingAccount} from '@/api/all';
export default {
  name: '',
  components: {},
  data() {
    let self = this;
    return {
      userFrom: {
        searchAccount: '',
        searchName: '',
        searchABA: '',
        searchACH: '',
        user_type: '',
        page: 1,
        limit: 10,
      },

      collapse: false,
      selectLabelShow: false,
      selectDataLabel: [],
      address: '',
      headeNum: [{ type: '', name: '国外' }],
      userLists: [],
      total: 0,
    };
  },
  watch: {},
  computed: {},
  async created() {
    console.log(this.imgOssUrl);
    const res = await getReceivingAccount({
      page: 1,
      size: 10
     
    });

    this.userLists = res.data.data;
    this.total = res.data.total;
   
  },
  mounted() {},
  methods: {
    openSelectLabel() {
      this.selectLabelShow = true;
    },

    async provinceFn(pid) {
      const res = await getProvinceFn({ pid: pid });
      return res.data;
    },

    //地址选择
    handleChange(label) {
      this.address = label;
      console.log(this.address);
    },

    userSearchs() {
      console.log(this.userFrom);
    },
    reset() {
      this.userFrom = {
        userName: '',
        userEmail: '',
        userPhone: '',
        dateTime: '',
        nickName: '',
      };
    },
    pageChange() {},
  },
};
</script>
<style scoped lang="scss">
::v-deep .el-tabs__item {
  height: 54px !important;
  line-height: 54px !important;
}
.picBox {
  display: inline-block;
  cursor: pointer;

  .upLoad {
    width: 58px;
    height: 58px;
    line-height: 58px;
    border: 1px dotted rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.02);
    font-size: 24px;
    font-weight: 500;
  }

  .pictrue {
    width: 60px;
    height: 60px;
    border: 1px dotted rgba(0, 0, 0, 0.1);
    margin-right: 10px;

    img {
      width: 100%;
      height: 100%;
    }
  }
}

.userFrom {
  ::v-deep .ivu-form-item-content {
    margin-left: 0px !important;
  }
}

.userAlert {
  margin-top: 20px;
}

.userI {
  color: var(--prev-color-primary);
  font-style: normal;
}

img {
  height: 36px;
  display: block;
}

.tabBox2_img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;

  img {
    width: 100%;
    height: 100%;
  }
}
.tabBox_img-box {
  display: flex;
}
.tabBox_img {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  cursor: pointer;

  img {
    width: 100%;
    height: 100%;
  }
}

.tabBox_tit {
  width: 60%;
  font-size: 12px !important;
  margin: 0 2px 0 10px;
  letter-spacing: 1px;
  padding: 5px 0;
  box-sizing: border-box;
}

.modelBox {
  ::v-deep .ivu-modal-body {
    padding: 0 16px 16px 16px !important;
  }
}

.vipName {
  color: #dab176;
}

.listbox {
  ::v-deep .ivu-divider-horizontal {
    margin: 0 !important;
  }
}

.labelInput {
  width: 250px;
  border: 1px solid #dcdee2;
  padding: 0 15px;
  border-radius: 5px;
  min-height: 30px;
  cursor: pointer;
  font-size: 12px;
  .span {
    color: #c5c8ce;
  }

  .ivu-icon-ios-arrow-down {
    font-size: 14px;
    color: #808695;
  }
}

.demo-drawer-footer {
  width: 100%;
  position: absolute;
  bottom: 0;
  left: 0;
  border-top: 1px solid #e8e8e8;
  padding: 10px 16px;
  text-align: right;
  background: #fff;
}
.search-form {
  display: flex;
  justify-content: space-between;
  .search-form-box {
    display: flex;
    flex-wrap: wrap;
    flex: 1;
  }
}
.search-form-sub {
  display: flex;
}
</style>

